function [ psiK ] = createPsiK2D( kx0,dkx0,x0,L,nm )
    eps = 1e-9;
    n2 = nm / 2;

    
    psiK = zeros(nm,nm);
    for k =1:nm
        for j = 1:nm
            ck=  getCk( [((k-n2)*2*pi/L),((j-n2)*2*pi/L)],kx0,x0,dkx0);
            %if(abs(ck)> eps)
                psiK(k,j) = ck;
            %end
        end
    end
       
end

function [ ck ] = getCk( kx, kx0 , x, dkx)
    dkx = dkx * 64 * pi;
    coeff =power( prod(dkx),1/4 );
    real = ((kx - kx0).^2)./(dkx * 4);
    ck =  (exp(-sum(real))/ coeff) * exp( -1i *kx*x');
end
    